package com.share.dubbo.es.service.impl;

import com.share.common.common.Page;
import com.share.common.common.Result;
import com.share.dubbo.es.manager.EsAccessLogManager;
import com.share.dubbo.es.model.EsAccessLogReq;
import com.share.dubbo.es.model.EsAccessLogResq;
import com.share.dubbo.es.model.EsAccessLogSaveReq;
import com.share.dubbo.es.service.EsAccessLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@com.alibaba.dubbo.config.annotation.Service(interfaceClass = EsAccessLogService.class)
public class EsAccessLogServiceImpl implements EsAccessLogService {
    @Autowired
    private EsAccessLogManager esAccessLogManager;


    @Override
    public Result count(EsAccessLogReq req) {
        return Result.success(esAccessLogManager.count(req));
    }

    @Override
    public Result<Page<EsAccessLogResq>> pageList(EsAccessLogReq req) {
        return Result.success(esAccessLogManager.pageList(req));
    }

    @Override
    public Result<Long> save(EsAccessLogSaveReq req) {
        return Result.success(esAccessLogManager.save(req));
    }
}
